﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using ThapCam.Ulti;

namespace ThapCam.System
{
    public static class WebConfig
    {
        public static string HOST_URL = "HOST_URL";
        public static string HOST_RESOURCE = "HOST_RESOURCE";
        public static string READ_POOL = "READ_POOL";
        public static string WRITE_POOL = "WRITE_POOL";
        public static string CACHE_TIME_EXPIRES = "CACHE_TIME_EXPIRES";
        public static string COOKIES_TIME_EXPIRES = "COOKIES_TIME_EXPIRES";
        public static string IS_COMPRESS_HTML = "IS_COMPRESS_HTML";

        public static void initConfig()
        {
            READ_POOL = ConfigurationManager.ConnectionStrings[READ_POOL].ConnectionString.Trim();
            WRITE_POOL = ConfigurationManager.ConnectionStrings[WRITE_POOL].ConnectionString.Trim();

            HOST_URL = ConfigurationManager.AppSettings[HOST_URL].Trim();
            HOST_RESOURCE = ConfigurationManager.AppSettings[HOST_RESOURCE].Trim();
            COOKIES_TIME_EXPIRES = ConfigurationManager.AppSettings[COOKIES_TIME_EXPIRES].Trim();
            CACHE_TIME_EXPIRES = ConfigurationManager.AppSettings[CACHE_TIME_EXPIRES].Trim();
            IS_COMPRESS_HTML = ConfigurationManager.AppSettings[IS_COMPRESS_HTML].Trim();

        }
    }
}
